class Sender:
    def __init__(self, info:dict):
        self.nickname = info['sender']['nickname']
        self.type = info['message_type']
        self.id = info['user_id']

        # group
        self.cardname = None
        self.group_id = None
        self.role = None
        if info['message_type'] == 'group':
            self.cardname = info['sender']['card'] or self.nickname
            self.role = info['sender']['role']   # admin or member
            self.group_id = info['group_id']
            self.group_name = ""
            